package pt.nmfa.peste.session;

import pt.nmfa.peste.entity.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;
import java.util.Arrays;

@Name("channelsCategoryList")
public class ChannelsCategoryList extends EntityQuery<ChannelsCategory> {

	private static final String EJBQL = "select channelsCategory from ChannelsCategory channelsCategory";

	private static final String[] RESTRICTIONS = { "lower(channelsCategory.id.epgpos) like lower(concat(#{channelsCategoryList.channelsCategory.id.epgpos},'%'))", };

	private ChannelsCategory channelsCategory;

	public ChannelsCategoryList() {
		channelsCategory = new ChannelsCategory();
		channelsCategory.setId(new ChannelsCategoryId());
		setEjbql(EJBQL);
		setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));
		setMaxResults(25);
	}

	public ChannelsCategory getChannelsCategory() {
		return channelsCategory;
	}
}
